(insert-directory): Be sure to bind
authorKenichi Handa <handa@m17n.org>
Tue, 9 Jul 2002 02:41:40 +0000 (02:41 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 9 Jul 2002 02:41:40 +0000 (02:41 +0000)
coding-system-for-write to the just decided
coding-system-for-read.

lisp/files.el

index 27ecf1901d504a42a040d901751b4dee301e0e0f..f457b85e1894f1adaaa6b906f6634f34f5ad371b 100644 (file)
@@ -3910,12 +3910,12 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'."
 
          ;; Read the actual directory using `insert-directory-program'.
          ;; RESULT gets the status code.
-         (let ((coding-system-for-read
-                (and enable-multibyte-characters
-                     (or file-name-coding-system
-                         default-file-name-coding-system)))
-               ;; This is to control encoding the arguments in call-process.
-               (coding-system-for-write coding-system-for-read))
+         (let* ((coding-system-for-read
+                 (and enable-multibyte-characters
+                      (or file-name-coding-system
+                          default-file-name-coding-system)))
+                ;; This is to control encoding the arguments in call-process.
+                (coding-system-for-write coding-system-for-read))
            (setq result
                  (if wildcard
                      ;; Run ls in the directory part of the file pattern